package com.training.java.core.collections.car.pre15;

/**
 * This is an example to demonstrate how the collections work. Objective:Create
 * multiple fruits objects and adding to the collection.
 * 
 * @author Satya
 * 
 */

public class Fruit {

	// State of the object fruit
	private String name;
	private String color;
	private String taste;
	private int price;// give the setter method to change the value later

	// Creating the constructor to initiate values for instance variables

	public Fruit(String name, String color, String taste, int price)

	{
		this.name = name;
		this.color = color;
		this.taste = taste;
		this.price = price;
	}

	// Create Getters to get the info of instance variable.

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the color
	 */
	public String getColor() {
		return color;
	}

	/**
	 * @return the taste
	 */
	public String getTaste() {
		return taste;
	}

	/**
	 * @return the price
	 */
	public int getPrice() {
		return price;
	}

	// Setter methods.

	/**
	 * @param to
	 *            set the price
	 */
	public void setPrice(int price) {
		this.price = price;
	}

}
